//引入Vue
import Vue from 'vue'
//引入VueRouter
import VueRouter from 'vue-router'
// 引入路由组件
import goodsList from "@/views/goods-list.vue";
import goodsSearch from "@/views/goods-search.vue";
import myInfo from "@/views/my-info.vue";
// 安装插件
Vue.use(VueRouter)

// 配置路由配置
const routes = [
    {
        path:"/goods-list",component:goodsList
    },
    {
        path:"/goods-search",component:goodsSearch
    },
    {
        path:"/my-info",component:myInfo
    }
]
// 创建路由对象实例
const router = new VueRouter({
    routes
})

//导出路由对象实例
export default router
